﻿// -----------------------------------------------------------------------
// <copyright file="SerializableUserInGroup.cs" company="">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace Ex3
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using FacebookWrapper;
    using FacebookWrapper.ObjectModel;
    using Ex3.Logic;

    /// <summary>
    /// A friend in the circuit/ circle
    /// </summary>
    public class SerializableUserInCircuit : IPrototype<SerializableUserInCircuit>
    {
        public string Id { get; set; }

        public string Name { get; set; }

        public string URLPhoto { get; set; }

        // Empty constructor is required for serialization
        public SerializableUserInCircuit()
        {
        }

        public SerializableUserInCircuit(User i_User)
        {
            this.Id = i_User.Id;
            this.Name = i_User.Name;
            this.URLPhoto = i_User.PictureLargeURL;
        }

        public SerializableUserInCircuit DeepClone()
        {
            // We have only simple objects - if we will have complex object they will need to be deep cloned next.
            SerializableUserInCircuit newFriend = this.Clone();
            
            return newFriend;
        }

        public SerializableUserInCircuit Clone()
        {
            return (SerializableUserInCircuit)this.MemberwiseClone();
        }
    }
}
